﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using WcfRestfulTest.Modal;

namespace WcfRestfulTest
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract(Namespace = "WcfRestfulTest", Name = "Service1")]
    public interface IService1
    {
        [OperationContract]
        [WebGet(UriTemplate = "search/{code}", RequestFormat = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json)]
        UserInfo GetUserInfoByCode(string code);
        // TODO: 在此添加您的服务操作

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "register", ResponseFormat = WebMessageFormat.Xml,
            RequestFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
        UserInfo Register(UserInfo userInfo);

    }
}
